package mess;

import java.util.ArrayList;
import java.util.List;

public class LeeCode_1238 {
    public static void main(String[] args) {
        System.out.println(circularPermutation(2, 3));
    }

    private static List<Integer> circularPermutation(int n, int start) {
        List<Integer> res = new ArrayList<>();
        for (int i = 0; i < 1 << n; i++){
            res.add(i ^ (i >> 1) ^ start);
        }
        return res;
    }
}
